<template>
    <div>
        <!-- 顶部导航 -->
        <van-nav-bar fixed @click-left="onClickLeft" left-arrow left-text="返回" title="订单"></van-nav-bar>
        <el-table
            v-if="loading2"
            v-loading="loading"
            style="width: 100%;margin-top:20%">
        </el-table>
        <div class="result" v-show="loading1">
        <el-row>
          <el-col :sm="12" :lg="6">
              <el-result icon="success" title="购票成功">
              <template slot="extra">
                <el-button @click="gome()" type="primary" size="medium">返回</el-button>
              </template>
            </el-result>
            </el-col>
        </el-row>
        </div>
    </div>
</template>

<script>
    export default {
        data() {
          return {
            loading: true,
            loading1: false,
            loading2: true

          };
        },
        mounted () {
          setTimeout(() => {
            this.loading=false
            this.loading1=true
            this.loading2=false
          }, 2000);
        },
        methods: {
            onClickLeft() {
                this.$router.go(-1)
            },
            gome(){
              this.$router.push('/')
            }
        },
        
    }
</script>

<style lang="scss" scoped>
body{
  background-color: #fff !important;
}
.loading{
    width: 100%;
    height: 300px;
    margin-top: 30%;
}
.result{
  margin-top: 25%;
}
</style>